<html>
<head><meta charset="utf-8"><title>Separate HIR owners · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Separate.20HIR.20owners.html">Separate HIR owners</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="239876135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Separate%20HIR%20owners/near/239876135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aliénore Bouttefeux <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Separate.20HIR.20owners.html#239876135">(May 22 2021 at 14:23)</a>:</h4>
<p><span class="user-mention" data-user-id="248906">@cjgillot</span> for this issue <a href="https://github.com/rust-lang/rust/issues/83158">https://github.com/rust-lang/rust/issues/83158</a>, I am not sure I undertand what you mean in the last point for the methode <code>local_def_id_to_hir_id</code> and <code>local_def_id</code>, they should be methode of what ?</p>



<a name="239878408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Separate%20HIR%20owners/near/239878408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cjgillot <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Separate.20HIR.20owners.html#239878408">(May 22 2021 at 14:59)</a>:</h4>
<p>Those are already existing methods on <code>rustc_middle::hir::map::Map</code>. They are used to convert between a <code>HirId</code> and a <code>LocalDefId</code>. One objective of this change is to reduce the amount of calls to <code>local_def_id_to_hir_id</code>: when we have a <code>HirOwner</code>, we statically know the result of this operation to be <code>HirId { owner, local_id: ItemLocalId::new(0) }</code>.</p>



<a name="239940328"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Separate%20HIR%20owners/near/239940328" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aliénore Bouttefeux <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Separate.20HIR.20owners.html#239940328">(May 23 2021 at 10:16)</a>:</h4>
<p>Also should I also change other queries ? Also clippy fail to build because of the change, should I change clippy too ?</p>



<a name="239951313"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Separate%20HIR%20owners/near/239951313" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Separate.20HIR.20owners.html#239951313">(May 23 2021 at 13:25)</a>:</h4>
<p><span class="user-mention" data-user-id="404353">@Aliénore Bouttefeux</span> yes, you should fix clippy at the same time</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>